public static void main(String[] args) {
        //Declaración de variables
            int stockInicial;
            int cantPersonas, cantEntrega;
         //Entrada de datos
            stockInicial = Integer.parseInt(JOptionPane.showInputDialog("Ingrese Stock Inicial"));
            cantPersonas = 0;                     
        //Empezamos a repartir las vacunas
                while(stockInicial>=10)
                {
                    cantEntrega = Integer.parseInt(JOptionPane.showInputDialog(
                    "Ingrese cantidad Entregada " + (cantPersonas+1) +" Stock Actual: "
                    + stockInicial+" Reparto de vacunas",1));
                    //validamos que la cantidad sea menor que el stock
                    if (stockInicial >= cantEntrega)
                    {
                    cantPersonas = cantPersonas + 1;
                    stockInicial = stockInicial - cantEntrega;
                    }
                    else
                    {
                        JOptionPane.showMessageDialog(null,
                                "No hay suficiente Stock","Reparto de Vacunas",JOptionPane.ERROR_MESSAGE);
                    }
                }
            JOptionPane.showMessageDialog(null, "El Stock es inferior a 10 und","Reparto de Vacunas",
                    JOptionPane.INFORMATION_MESSAGE);            
            //Salida de Información
            JOptionPane.showMessageDialog(null,"Estock Final: "+stockInicial);
            JOptionPane.showMessageDialog(null,"Cantidad de reparto: "+cantPersonas);
    }